package com.byxy.shop.dao;

import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.byxy.shop.entity.GoodsCategory;

/**
 * @author 廖善椅
 * @ClassName GoodsCategoryDao
 * @Description Dao接口
 * @date 2020年5月17日
 */

public interface GoodsCategoryDao {
	
	@Select("select * from tb_newbee_mall_goods_category where category_level = #{level} ")
    List<GoodsCategory> findCategoryByLevel(Integer level);

	@Select("select * from tb_newbee_mall_goods_category where category_level = #{level} and parent_id=#{categoryId} ")
    List<GoodsCategory> findCategoryByLevelAndId(Integer level, Integer categoryId);
	
	@Select("select * from tb_newbee_mall_goods_category where category_id = #{goodsCategoryId}")
	GoodsCategory getByCategoryId(Integer goodsCategoryId);
}
